﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace FixedVehicle
{
    class Program
    {
        static void Main(string[] args)
        {
            if (null != args && 0 < args.Length)
            {
                string path = args[0];

                Biz biz = Biz.Instance;

                biz.Filter = @"\.txt";

                biz.OnMsg = OnWriteMsgOut;

                biz.OnFoundReport = OnFoundReport;

                biz.FindFileList(path);
            }
            else
            {
                OnWriteMsgOut(string.Format("请选择需要处理的文件夹!"));
            }

            Console.ReadLine();

        }

        static void OnWriteMsgOut(string msg)
        {
            Console.WriteLine(msg);
        }

        static bool OnFoundReport(FileInfo file)
        {
            OnWriteMsgOut(string.Format("已经查找到文件：{0}", file.Name));

            return true;
        }
    }

}
